home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / jazlib.arc / JZBIOSTM.C < prev    next >
Text File  |  1988-12-18  |  778b  |  29 lines

  1. /*
  2. ┌────────────────────────────────────────────────────────────────────────────┐
  3. │jzbiostm                                     │
  4. │Return a time string in the form HH:MM:SS using the bios dword ptr in low   │
  5. │memory at 0x40:0x6C.                                 │
  6. │                                         │
  7. │ (C) JazSoft Software by Jack A. Zucker (301) 794-5950              │
  8. └────────────────────────────────────────────────────────────────────────────┘
  9. */
  10.  
  11. #include <jaz.h>
  12. jzbiostm(fstr)
  13. char *fstr;
  14. {
  15.  
  16.   long wclock;
  17.   unsigned int whour,wminute,wsecond,wremain;
  18.  
  19.   wclock = MEML(0x40,0x6C);    /* point to clock in low memory bios */
  20.  
  21.   whour = wclock / 65543;
  22.   wremain = wclock % 65543;
  23.   wminute = wremain / 1092;
  24.   wremain %= 1092;
  25.   wsecond = wremain / 18;
  26.  
  27.   sprintf(fstr,"%02d:%02d:%02d",whour,wminute,wsecond);
  28. }
  29.